<template>
<Layout class="home">
    <div class="content">
        <input type="text" name="" v-model="value">
        {{value}}
        <el-button>默认按钮</el-button>
    </div>
</Layout>
</template>
<script lang="ts">
import {
    Component
} from "vue-property-decorator";
import Layout from "@/components/layout.vue";
import {
    BaseVue
} from "../base-vue";
import Utils from "../utils/";

@Component < AppComponent > ({
    components: {
        Layout
    }
})
export default class AppComponent extends BaseVue {
    data() {
        return {
            name: "test",
            value:'test'
        };
    }
    methods() {}
    created() {
        console.log(this.$data.name);

        // storage已做客户端判断
        Utils.storage.set("name", "wukai");
    }
    mounted() {
        // this.showMessage({
        //     type: "info",
        //     message: "123"
        // });

        this.$data.name = Utils.storage.get("name");
        // console.log(this.$store.state);
    }
    // public blog = "";
    // public get isLogin() {
    //   // return !!this.state.user.name;
    //   return false;
    // }

    // /**
    //  * 在服务器端，获取微博列表数据
    //  */
    public serverPrefetch() {
        return Promise.all([this.getBanner(), this.getHomeNewsList()]);
    }
}
</script>
